/**
 * @author 汪孟苹
 */
define([],function(){
	var tpl = {};
	tpl.init1 = function(){
		var html = '';
		html += list();
		return html;
	}
	tpl.init2 = function(){
		var html = '';
		html += datailInfo();
		return html;
	}
    tpl.init3 = function(){
        var html = '';
        html += userInfo();
        return html;
    }
    var userInfo = function(){
        return 	'<script id="tpl_userinfo2" type="text/html">'+
            '{{list}}'+
            '<div>'+
            '{{if gender=="F"}}'+
            '<i class="fa fa-female" aria-hidden="true"></i>'+
            '{{else if gender=="N"}}'+
            '<i class="fa fa-male" aria-hidden="true"></i>'+
            '{{/if}}'+
            '</div>'+
            '<div>'+
            '<font class="tem-username">{{username}}</font>'+
            '<br/>'+
            '<font class="tem-birthday">生日：{{birthday}}</font>'+
            '</div>'
    }
	var list = function(){
		return 	'<script id="tpl_temperature_list" type="text/html">'+
			'    <div class="top-nav">监测记录</div>'+
			'    {{each rows as value i}}'+
			'    <div class="bottom-con" bodytemperatureId="{{value.bodytemperatureId}}">'+
            '       <p><i class="fa fa-calendar-o bf" aria-hidden="true"></i>{{value.startTime}}</p>'+
            '  		<p><i class="fa fa-clock-o bf" aria-hidden="true"></i>{{value.timeLong}}</p>'+
			'    </div>'+
			'    {{/each}}'+
		        '<script>';
	}
	var datailInfo = function(){
		return 	'<script id="tpl_temperature_datailInfo" type="text/html">'+
			'	{{each rows as value i}}'+
			'	<div class="con-p">'+
                        '        <p>检测时间：{{value.testTime}}</p>'+
                        '        <p>监测时长：{{value.timeLong}}</p>'+
                        '        <p>监测年龄：{{value.weekAge}}周龄</p>'+
                        '        <p>患者类型：{{value.userType}}</p>'+
                        '        <p>正常范围：<{{value.tempalarmTop}}℃</p>'+
                        '    </div>'+
                        '    <div class="form clearfix">'+
                        '        <div>'+
                        '            <div class="bgc-1">'+
                        '                <h3>{{value.valueMax}}</h3>'+
                        '                <p>体温（℃）</p>'+
                        '            </div>'+
                        '            <span>最高值</span>'+
                        '        </div>'+
                        '        <div>'+
                        '            <div class="bgc-2">'+
                        '                <h3>{{value.valueMin}}</h3>'+
                        '                <p>体温（℃）</p>'+
                        '            </div>'+
                        '            <span>最低值</span>'+
                        '        </div>'+
                        '        <div>'+
                        '            <div class="bgc-3">'+
                        '                <h3>{{value.finalvalue}}</h3>'+
                        '                <p>体温（℃）</p>'+
                        '            </div>'+
                        '            <span>最终值</span>'+
                        '        </div>'+
                        '    </div>'+
                        '	{{/each}}'+
		        '<script>';
	}
	return tpl;
});